﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;

namespace DBSchemaViewer.FrontEnd.Main.Helpers
{
    public class MainPageHelper
    {
        public void CenterPopup(Popup popupCtl, Canvas rootCanvas)
        {
            //popupCtl.VerticalOffset = rootCanvas.Height / 2 - (popupCtl.Height / 2);
            popupCtl.VerticalOffset = (rootCanvas.Height - popupCtl.Height) / 2;
            popupCtl.HorizontalOffset = rootCanvas.Width / 2 - (popupCtl.Width / 2);
            
        }
    }
}
